<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    body,div{padding: 0 ;margin:0;}
    /* 一栏定宽一栏自适应 */


    /* 方法一margin-left */
	/* .left{
        width: 100px;
        height: 200px;
        background-color: skyblue;
        float:left;
    }
    .right{
        height: 300px;
        background-color: yellow;
        margin-left:100px;
    } */


    /* 方法二右边overflow */
    /* .left{
        width: 100px;
        height: 200px;
        background-color: skyblue;
        float:left;
    }
    .right{
        height: 300px;
        background-color: yellow;
        overflow: hidden;
    } */

    /* 方法三绝对定位 */
    /* .container{
        position: relative;
    }
    .left{
        width: 100px;
        height: 200px;
        background-color: skyblue;
    }
    .right{
        height: 300px;
        background-color: yellow;
        position:absolute;
        left: 100px;
        top:0;
        right: 0;
    } */
 

    /* 方法四弹性布局 */
   /* .container{
        display:flex;
    }
    .left{
        width: 100px;
        height: 200px;
        background-color: skyblue;
    }
    .right{
        height: 300px;
        background-color: yellow;
        flex: 1;
    } */



    /* 一栏不定宽，一栏自适应 */
    /* 方法一float */
    /* .left{
        height: 200px;
        background-color: skyblue;
        float:left;
    }
    .right{
        height: 300px;
        background-color: yellow;
        overflow: hidden;
    }  */


    /* 方法二flex */
    .container{
        display:flex;
    }
    .left{
        height: 200px;
        background-color: skyblue;
    }
    .right{
        height: 300px;
        background-color: yellow;
        flex:1;
    } 
</style>
<body>
    <div class="container">
        <div class="left">left</div>
        <div class="right">right</div> 
    </div> 
</body>
</html>